package com.hhq.usercenter.domain.pojo;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;

import java.util.Set;

/**
 * <p>Description: 用户信息 </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/1/8 13:53
 */
@Setter
@Getter
@NoArgsConstructor
public class UserInfo {

    /**
     * 用户名称
     */
    private String username;
    /**
     * 权限
     */
    private Set<GrantedAuthority> authorities;
    /**
     * token
     */
    private String token;

    public UserInfo(String username, Set<GrantedAuthority> authorities, String token) {
        this.username = username;
        this.authorities = authorities;
        this.token = token;
    }
}
